package oj;

import java.util.Scanner;

/**
 * @author 郝文雪
 * @date 2022/7/14 10:45
 * @Description Test
 */
public class Day15查找输入整数二进制中1的个数 {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
            int n=sc.nextInt();
            int count=0;
            while(n!=0){
                n=n&(n-1);
                count++;
            }
            System.out.println(count);
        }
    }
}
